// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package v20180801

import (
    "context"
    "errors"
    "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
    tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
    "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
)

const APIVersion = "2018-08-01"

type Client struct {
    common.Client
}

// Deprecated
func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) {
    cpf := profile.NewClientProfile()
    client = &Client{}
    client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf)
    return
}

func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) {
    client = &Client{}
    client.Init(region).
        WithCredential(credential).
        WithProfile(clientProfile)
    return
}


func NewDescribeMCDNBillDataRequest() (request *DescribeMCDNBillDataRequest) {
    request = &DescribeMCDNBillDataRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNBillData")
    
    
    return
}

func NewDescribeMCDNBillDataResponse() (response *DescribeMCDNBillDataResponse) {
    response = &DescribeMCDNBillDataResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNBillData
// 查询MCDN域名带宽及其他信息
func (c *Client) DescribeMCDNBillData(request *DescribeMCDNBillDataRequest) (response *DescribeMCDNBillDataResponse, err error) {
    return c.DescribeMCDNBillDataWithContext(context.Background(), request)
}

// DescribeMCDNBillData
// 查询MCDN域名带宽及其他信息
func (c *Client) DescribeMCDNBillDataWithContext(ctx context.Context, request *DescribeMCDNBillDataRequest) (response *DescribeMCDNBillDataResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNBillDataRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNBillData require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNBillDataResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNDistrictIspDataRequest() (request *DescribeMCDNDistrictIspDataRequest) {
    request = &DescribeMCDNDistrictIspDataRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNDistrictIspData")
    
    
    return
}

func NewDescribeMCDNDistrictIspDataResponse() (response *DescribeMCDNDistrictIspDataResponse) {
    response = &DescribeMCDNDistrictIspDataResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNDistrictIspData
// 查询指定域名的区域、运营商明细数据
func (c *Client) DescribeMCDNDistrictIspData(request *DescribeMCDNDistrictIspDataRequest) (response *DescribeMCDNDistrictIspDataResponse, err error) {
    return c.DescribeMCDNDistrictIspDataWithContext(context.Background(), request)
}

// DescribeMCDNDistrictIspData
// 查询指定域名的区域、运营商明细数据
func (c *Client) DescribeMCDNDistrictIspDataWithContext(ctx context.Context, request *DescribeMCDNDistrictIspDataRequest) (response *DescribeMCDNDistrictIspDataResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNDistrictIspDataRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNDistrictIspData require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNDistrictIspDataResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNDomainsRequest() (request *DescribeMCDNDomainsRequest) {
    request = &DescribeMCDNDomainsRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNDomains")
    
    
    return
}

func NewDescribeMCDNDomainsResponse() (response *DescribeMCDNDomainsResponse) {
    response = &DescribeMCDNDomainsResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNDomains
// 查询AppId对应用户名下的MCDN域名
func (c *Client) DescribeMCDNDomains(request *DescribeMCDNDomainsRequest) (response *DescribeMCDNDomainsResponse, err error) {
    return c.DescribeMCDNDomainsWithContext(context.Background(), request)
}

// DescribeMCDNDomains
// 查询AppId对应用户名下的MCDN域名
func (c *Client) DescribeMCDNDomainsWithContext(ctx context.Context, request *DescribeMCDNDomainsRequest) (response *DescribeMCDNDomainsResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNDomainsRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNDomains require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNDomainsResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNForbidTasksRequest() (request *DescribeMCDNForbidTasksRequest) {
    request = &DescribeMCDNForbidTasksRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNForbidTasks")
    
    
    return
}

func NewDescribeMCDNForbidTasksResponse() (response *DescribeMCDNForbidTasksResponse) {
    response = &DescribeMCDNForbidTasksResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNForbidTasks
// MCDN封禁历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNForbidTasks(request *DescribeMCDNForbidTasksRequest) (response *DescribeMCDNForbidTasksResponse, err error) {
    return c.DescribeMCDNForbidTasksWithContext(context.Background(), request)
}

// DescribeMCDNForbidTasks
// MCDN封禁历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNForbidTasksWithContext(ctx context.Context, request *DescribeMCDNForbidTasksRequest) (response *DescribeMCDNForbidTasksResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNForbidTasksRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNForbidTasks require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNForbidTasksResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNLogDataRequest() (request *DescribeMCDNLogDataRequest) {
    request = &DescribeMCDNLogDataRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNLogData")
    
    
    return
}

func NewDescribeMCDNLogDataResponse() (response *DescribeMCDNLogDataResponse) {
    response = &DescribeMCDNLogDataResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNLogData
// 查询MCDN监控日志数据及其他。
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNLogData(request *DescribeMCDNLogDataRequest) (response *DescribeMCDNLogDataResponse, err error) {
    return c.DescribeMCDNLogDataWithContext(context.Background(), request)
}

// DescribeMCDNLogData
// 查询MCDN监控日志数据及其他。
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNLogDataWithContext(ctx context.Context, request *DescribeMCDNLogDataRequest) (response *DescribeMCDNLogDataResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNLogDataRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNLogData require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNLogDataResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNOriginDataRequest() (request *DescribeMCDNOriginDataRequest) {
    request = &DescribeMCDNOriginDataRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNOriginData")
    
    
    return
}

func NewDescribeMCDNOriginDataResponse() (response *DescribeMCDNOriginDataResponse) {
    response = &DescribeMCDNOriginDataResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNOriginData
// DescribeMCDNOriginData 用于查询 MCDN 实时回源监控数据，支持以下指标查询：
//
// 
//
// - 回源流量（单位为 byte）
//
// - 回源带宽（单位为 bps）
//
// - 回源请求数（单位为 次）
//
// - 回源失败请求数（单位为 次）
//
// - 回源失败率（单位为 %，小数点后保留两位）
//
// - 回源状态码 2xx 汇总及各 2 开头回源状态码明细（单位为 个）
//
// - 回源状态码 3xx 汇总及各 3 开头回源状态码明细（单位为 个）
//
// - 回源状态码 4xx 汇总及各 4 开头回源状态码明细（单位为 个）
//
// - 回源状态码 5xx 汇总及各 5 开头回源状态码明细（单位为 个）
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNOriginData(request *DescribeMCDNOriginDataRequest) (response *DescribeMCDNOriginDataResponse, err error) {
    return c.DescribeMCDNOriginDataWithContext(context.Background(), request)
}

// DescribeMCDNOriginData
// DescribeMCDNOriginData 用于查询 MCDN 实时回源监控数据，支持以下指标查询：
//
// 
//
// - 回源流量（单位为 byte）
//
// - 回源带宽（单位为 bps）
//
// - 回源请求数（单位为 次）
//
// - 回源失败请求数（单位为 次）
//
// - 回源失败率（单位为 %，小数点后保留两位）
//
// - 回源状态码 2xx 汇总及各 2 开头回源状态码明细（单位为 个）
//
// - 回源状态码 3xx 汇总及各 3 开头回源状态码明细（单位为 个）
//
// - 回源状态码 4xx 汇总及各 4 开头回源状态码明细（单位为 个）
//
// - 回源状态码 5xx 汇总及各 5 开头回源状态码明细（单位为 个）
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNOriginDataWithContext(ctx context.Context, request *DescribeMCDNOriginDataRequest) (response *DescribeMCDNOriginDataResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNOriginDataRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNOriginData require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNOriginDataResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNPurgeTasksRequest() (request *DescribeMCDNPurgeTasksRequest) {
    request = &DescribeMCDNPurgeTasksRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNPurgeTasks")
    
    
    return
}

func NewDescribeMCDNPurgeTasksResponse() (response *DescribeMCDNPurgeTasksResponse) {
    response = &DescribeMCDNPurgeTasksResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNPurgeTasks
// MCDN刷新历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNPurgeTasks(request *DescribeMCDNPurgeTasksRequest) (response *DescribeMCDNPurgeTasksResponse, err error) {
    return c.DescribeMCDNPurgeTasksWithContext(context.Background(), request)
}

// DescribeMCDNPurgeTasks
// MCDN刷新历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNPurgeTasksWithContext(ctx context.Context, request *DescribeMCDNPurgeTasksRequest) (response *DescribeMCDNPurgeTasksResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNPurgeTasksRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNPurgeTasks require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNPurgeTasksResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNPushTasksRequest() (request *DescribeMCDNPushTasksRequest) {
    request = &DescribeMCDNPushTasksRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNPushTasks")
    
    
    return
}

func NewDescribeMCDNPushTasksResponse() (response *DescribeMCDNPushTasksResponse) {
    response = &DescribeMCDNPushTasksResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNPushTasks
// MCDN预热历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNPushTasks(request *DescribeMCDNPushTasksRequest) (response *DescribeMCDNPushTasksResponse, err error) {
    return c.DescribeMCDNPushTasksWithContext(context.Background(), request)
}

// DescribeMCDNPushTasks
// MCDN预热历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNPushTasksWithContext(ctx context.Context, request *DescribeMCDNPushTasksRequest) (response *DescribeMCDNPushTasksResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNPushTasksRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNPushTasks require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNPushTasksResponse()
    err = c.Send(request, response)
    return
}

func NewDescribeMCDNResumeTasksRequest() (request *DescribeMCDNResumeTasksRequest) {
    request = &DescribeMCDNResumeTasksRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribeMCDNResumeTasks")
    
    
    return
}

func NewDescribeMCDNResumeTasksResponse() (response *DescribeMCDNResumeTasksResponse) {
    response = &DescribeMCDNResumeTasksResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribeMCDNResumeTasks
// MCDN解封历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNResumeTasks(request *DescribeMCDNResumeTasksRequest) (response *DescribeMCDNResumeTasksResponse, err error) {
    return c.DescribeMCDNResumeTasksWithContext(context.Background(), request)
}

// DescribeMCDNResumeTasks
// MCDN解封历史查询
//
// 可能返回的错误码:
//  INTERNALERROR = "InternalError"
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) DescribeMCDNResumeTasksWithContext(ctx context.Context, request *DescribeMCDNResumeTasksRequest) (response *DescribeMCDNResumeTasksResponse, err error) {
    if request == nil {
        request = NewDescribeMCDNResumeTasksRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribeMCDNResumeTasks require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribeMCDNResumeTasksResponse()
    err = c.Send(request, response)
    return
}

func NewDescribePCDNLogDownloadListRequest() (request *DescribePCDNLogDownloadListRequest) {
    request = &DescribePCDNLogDownloadListRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "DescribePCDNLogDownloadList")
    
    
    return
}

func NewDescribePCDNLogDownloadListResponse() (response *DescribePCDNLogDownloadListResponse) {
    response = &DescribePCDNLogDownloadListResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// DescribePCDNLogDownloadList
// 查询PCDN日志下载地址和其他信息。
//
// 可能返回的错误码:
//  FAILEDOPERATION = "FailedOperation"
//  INVALIDPARAMETERVALUE = "InvalidParameterValue"
//  MISSINGPARAMETER = "MissingParameter"
//  RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
//  RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
//  RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
//  RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
//  UNSUPPORTEDOPERATION = "UnsupportedOperation"
func (c *Client) DescribePCDNLogDownloadList(request *DescribePCDNLogDownloadListRequest) (response *DescribePCDNLogDownloadListResponse, err error) {
    return c.DescribePCDNLogDownloadListWithContext(context.Background(), request)
}

// DescribePCDNLogDownloadList
// 查询PCDN日志下载地址和其他信息。
//
// 可能返回的错误码:
//  FAILEDOPERATION = "FailedOperation"
//  INVALIDPARAMETERVALUE = "InvalidParameterValue"
//  MISSINGPARAMETER = "MissingParameter"
//  RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
//  RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
//  RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
//  RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
//  UNSUPPORTEDOPERATION = "UnsupportedOperation"
func (c *Client) DescribePCDNLogDownloadListWithContext(ctx context.Context, request *DescribePCDNLogDownloadListRequest) (response *DescribePCDNLogDownloadListResponse, err error) {
    if request == nil {
        request = NewDescribePCDNLogDownloadListRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("DescribePCDNLogDownloadList require credential")
    }

    request.SetContext(ctx)
    
    response = NewDescribePCDNLogDownloadListResponse()
    err = c.Send(request, response)
    return
}

func NewForbidMCDNUrlRequest() (request *ForbidMCDNUrlRequest) {
    request = &ForbidMCDNUrlRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "ForbidMCDNUrl")
    
    
    return
}

func NewForbidMCDNUrlResponse() (response *ForbidMCDNUrlResponse) {
    response = &ForbidMCDNUrlResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// ForbidMCDNUrl
// 封禁URL。资源被封禁后，MCDN将对被封禁资源返回403状态码。
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) ForbidMCDNUrl(request *ForbidMCDNUrlRequest) (response *ForbidMCDNUrlResponse, err error) {
    return c.ForbidMCDNUrlWithContext(context.Background(), request)
}

// ForbidMCDNUrl
// 封禁URL。资源被封禁后，MCDN将对被封禁资源返回403状态码。
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) ForbidMCDNUrlWithContext(ctx context.Context, request *ForbidMCDNUrlRequest) (response *ForbidMCDNUrlResponse, err error) {
    if request == nil {
        request = NewForbidMCDNUrlRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("ForbidMCDNUrl require credential")
    }

    request.SetContext(ctx)
    
    response = NewForbidMCDNUrlResponse()
    err = c.Send(request, response)
    return
}

func NewPurgeMCDNUrlsCacheRequest() (request *PurgeMCDNUrlsCacheRequest) {
    request = &PurgeMCDNUrlsCacheRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "PurgeMCDNUrlsCache")
    
    
    return
}

func NewPurgeMCDNUrlsCacheResponse() (response *PurgeMCDNUrlsCacheResponse) {
    response = &PurgeMCDNUrlsCacheResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// PurgeMCDNUrlsCache
// 刷新MCDN资源
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) PurgeMCDNUrlsCache(request *PurgeMCDNUrlsCacheRequest) (response *PurgeMCDNUrlsCacheResponse, err error) {
    return c.PurgeMCDNUrlsCacheWithContext(context.Background(), request)
}

// PurgeMCDNUrlsCache
// 刷新MCDN资源
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) PurgeMCDNUrlsCacheWithContext(ctx context.Context, request *PurgeMCDNUrlsCacheRequest) (response *PurgeMCDNUrlsCacheResponse, err error) {
    if request == nil {
        request = NewPurgeMCDNUrlsCacheRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("PurgeMCDNUrlsCache require credential")
    }

    request.SetContext(ctx)
    
    response = NewPurgeMCDNUrlsCacheResponse()
    err = c.Send(request, response)
    return
}

func NewPushMCDNUrlsCacheRequest() (request *PushMCDNUrlsCacheRequest) {
    request = &PushMCDNUrlsCacheRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "PushMCDNUrlsCache")
    
    
    return
}

func NewPushMCDNUrlsCacheResponse() (response *PushMCDNUrlsCacheResponse) {
    response = &PushMCDNUrlsCacheResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// PushMCDNUrlsCache
// 预热MCDN资源
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) PushMCDNUrlsCache(request *PushMCDNUrlsCacheRequest) (response *PushMCDNUrlsCacheResponse, err error) {
    return c.PushMCDNUrlsCacheWithContext(context.Background(), request)
}

// PushMCDNUrlsCache
// 预热MCDN资源
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) PushMCDNUrlsCacheWithContext(ctx context.Context, request *PushMCDNUrlsCacheRequest) (response *PushMCDNUrlsCacheResponse, err error) {
    if request == nil {
        request = NewPushMCDNUrlsCacheRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("PushMCDNUrlsCache require credential")
    }

    request.SetContext(ctx)
    
    response = NewPushMCDNUrlsCacheResponse()
    err = c.Send(request, response)
    return
}

func NewResumeMCDNUrlRequest() (request *ResumeMCDNUrlRequest) {
    request = &ResumeMCDNUrlRequest{
        BaseRequest: &tchttp.BaseRequest{},
    }
    
    request.Init().WithApiInfo("live", APIVersion, "ResumeMCDNUrl")
    
    
    return
}

func NewResumeMCDNUrlResponse() (response *ResumeMCDNUrlResponse) {
    response = &ResumeMCDNUrlResponse{
        BaseResponse: &tchttp.BaseResponse{},
    } 
    return

}

// ResumeMCDNUrl
// 解封URL。资源被解封后，MCDN将正常响应数据。
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) ResumeMCDNUrl(request *ResumeMCDNUrlRequest) (response *ResumeMCDNUrlResponse, err error) {
    return c.ResumeMCDNUrlWithContext(context.Background(), request)
}

// ResumeMCDNUrl
// 解封URL。资源被解封后，MCDN将正常响应数据。
//
// 可能返回的错误码:
//  INVALIDPARAMETERVALUE_INVALIDPARAM = "InvalidParameterValue.InvalidParam"
func (c *Client) ResumeMCDNUrlWithContext(ctx context.Context, request *ResumeMCDNUrlRequest) (response *ResumeMCDNUrlResponse, err error) {
    if request == nil {
        request = NewResumeMCDNUrlRequest()
    }
    
    if c.GetCredential() == nil {
        return nil, errors.New("ResumeMCDNUrl require credential")
    }

    request.SetContext(ctx)
    
    response = NewResumeMCDNUrlResponse()
    err = c.Send(request, response)
    return
}
